﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="updateFund.aspx.cs" Inherits="WebApplication1.updateFund" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table>
<tr>
<td>

    <asp:Label ID="lblUpdateFund" runat="server" Font-Bold="True" 
        Font-Names="Aparajita" Font-Size="Larger" ForeColor="Red" ></asp:Label>

</td>

</tr>
<tr>
<td>
<asp:GridView ID="gvUpdateFund" runat="server" AllowPaging="True" 
        DataKeyNames="FundId" AutoGenerateEditButton="True"
        AllowSorting="True" AutoGenerateColumns="False" PageSize="5" OnRowCancelingEdit="CancelRecord"

           
        Height="154px" Width="581px" onrowdeleting="gvUpdateFund_RowDeleting" 
        onrowediting="gvUpdateFund_RowEditing" onrowupdating="gvUpdateFund_RowUpdating">
        <Columns>
            <asp:TemplateField HeaderText="Fund Name" SortExpression="Title">
            <ItemTemplate>
            <%# Eval("Title") %>
            </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtUpdFundTitle" runat="server" Text='<%# Eval("Title") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="Description" SortExpression="Description">
            <ItemTemplate>
            <%# Eval("Description")%>
            </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtUpdFundDescription" runat="server" Text='<%# Eval("Description") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="Donated By" SortExpression="DonatedBy" >
            <ItemTemplate>
            <%# Eval("DonatedBy")%>
            </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtUpdFundDonatedBy" runat="server" Text='<%# Eval("DonatedBy") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="Purpose" SortExpression="Purpose">
            <ItemTemplate>
            <%# Eval("Purpose")%>
            </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtUpdFundPurpose" runat="server" Text='<%# Eval("Purpose") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="Value" SortExpression="Value">
            <ItemTemplate>
            <%# Eval("Value")%>
            </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtUpdFundValue" runat="server" Text='<%# Eval("Value") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField >
             <asp:TemplateField HeaderText="Delete?">

                    <ItemTemplate>

                        <span onclick="return confirm('Are you sure to Delete?')">

                            <asp:LinkButton ID="lnBD" runat="server" Text="Delete" CommandName="Delete"></asp:LinkButton>

                        </span>

                    </ItemTemplate>

                </asp:TemplateField>
            </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />

            <RowStyle BackColor="#EFF3FB" />

    </asp:GridView>
</td>

</tr>
</table>
    
</asp:Content>
